package com.three.productList.feign;

import com.three.core.entity.FrontUser;
import com.three.core.entity.UserIntegral;
import com.three.core.vo.R;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @author ：li
 * @date ：Created in 2025/3/18 018 10:58
 * @description：
 * @modified By：
 * @version:
 */
@Component
public class FrontUserVipFallbackFactory implements FallbackFactory<FrontUserVipFeign> {
    @Override
    public FrontUserVipFeign create(Throwable cause) {
        return new FrontUserVipFeign() {

            @Override
            public R<FrontUser> getUserInfo() {
                return new R<>(500,"服务器故障",null);
            }

            @Override
            public R<UserIntegral> selectIntegralByUserId(Integer userId) {
                return new R<>(500,"服务器故障",null);
            }
        };
    }
}
